Arexx (1/45)

From:Andrew Bruno
Date:11 Aug 2001 at 04:49:28
Subject:Back to my "ITERATE" problem

Hi,

I have now got back into the swing of things and am playing with this
"terminate the loop" thing.

This is the example program:

/* */

ECHO 'Starting the program.'

test.1 = "ANDREW"
test.2 = "BARNEY"
test.3 = "CHARLIE"
test.4 = "DANNIEL"
test.5 = "EDWARD"
test.6 = "FREDERICK"

name = "EDWARD"

DO i = 1 to 6
IF name = test.i THEN
DO
ECHO 'Found'
ITERATE i
END
ECHO i
END

ECHO 'Exiting program'

The ITERATE i line is added later but this is what I get with the line in:

Starting the program.
1
2
3
4
Found
6
Exiting program

Without:

Starting the program.
1
2
3
4
Found
5
6
Exiting program

So I guess the ITERATE command is not doing what I want.

I guess the best way to do it is instead of the ITERATE i line, I should put
in i=6 and it will then stop altogether - right?

I am posting this as obvious as the answer is, to maybe help others who
are/were as confused as I was when I asked the question.

:)

Cya!



This is only a test. Had this been an actual tagline...

Andrew Bruno
abruno@zeta.org.au

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/saFolB/TM
---------------------------------------------------------------------~->

ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/